package com.dwd.user.service;

import com.dwd.basic.exception.CustomException;
import com.dwd.basic.service.IBaseService;
import com.dwd.org.pojo.Employee;
import com.dwd.user.pojo.User;
import com.dwd.user.pojo.dto.LoginInfoDto;

/**
 * @Description: TODO
 * @Author 汶狄
 * @Date 2021/1/16 12:36
 * @Version 1.0
 */

public interface IUserService extends IBaseService<User> {
    /**
     * 校验手机号码是否存在
     * @param phone
     * @throws CustomException
     */
      void checkPhone(String phone) throws CustomException;

    /**
     * 扩展登陆
     * @param username
     * @param password
     * @return
     * @throws CustomException
     */
    Employee login(String username, String password) throws CustomException;

    /**
     * 手机注册
     * @param loginInfoDto
     */
    void register(LoginInfoDto loginInfoDto) throws CustomException;

    /**
     * 邮箱注册
     * @param loginInfoDto
     */
    void emailRegister(LoginInfoDto loginInfoDto) throws CustomException;
}
